package com.frejoys.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.frejoys.dao.entity.HuajuanPush;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface HuajuanPushMapper extends BaseMapper<HuajuanPush> {

    @Select("select id from j_huajuan_push where msg_id=#{msgId} limit 1")
    HuajuanPush getIdByMsgId(@Param("msgId") String msgId);

    @Insert("insert into j_huajuan_push (msg_id, push_type, content, create_time) values (#{msgId}, #{pushType}, #{content}, #{createTime})")
    boolean addInfo(@Param("msgId") String msgId, @Param("pushType") String pushType, @Param("content") String content, @Param("createTime") Integer createTime);

}
